<?php echo $this->fetch('member.header.html'); ?>
<style>
.kdorder_add {background:#dddddd;}
.kdorder_add td{padding:8px; background:#FFF}
.kdorder_add .title_h1 {font-size:15px; color:#333; background:#d8ecfc; font-family:'Microsoft Yahei'}
.inputBorder{border: 1px #CCC solid;height: 20px;line-height: 20px;padding: 2px 4px;}
.kdorder_add .select_class {height:26px; padding:2px; line-height:26px;}
/*选择服务*/
.fuwu_xz {list-style:none; width:100%; overflow:hidden}
.fuwu_xz li {float:left;width:200px;line-height:30px;}
/*收发货地址*/
.adders_cass{width:790px; padding:10px; border:1px #ffcc33 solid; background:#ffffef; margin-left:35px;margin-bottom:10px}
.adders_cass td {padding:5px 0; background:#ffffef}
.adders_cass em {color:#F00; font-style:normal; margin-right:5px}
.botton_submit {border:0;background:#ed5736;height:35px;width:120px;text-align:center;line-height:35px;font-family:"Microsoft YaHei";font-size:15px;color:#fff;cursor:pointer;border-radius:4px; margin-right:10px}
.address_item {padding:5px 15px;}
</style>
<div class="content_color">
<div class="content">
<?php echo $this->fetch('member.menu.html'); ?>
<div id="right">
<?php echo $this->fetch('member.submenu.html'); ?>
<div class="wrap">
<?php if ($_GET['act'] != 'view' && $_GET['act'] != 'import'): ?>

<form action="" method="post" id="form_box">
<table cellspacing="1" width="100%" class="kdorder_add">
  <tr><td colspan="4" style="padding:12px 8px;background:#ffffe5">提示：每个包裹有上限为$100的丢件赔偿（易碎品、奶粉、液体等无破损赔偿，建议选择加固服务以降低破损），包裹内如有缺件请拒收，否则我们不予受理。</td></tr>
  <tr><td colspan="4" class="title_h1">&nbsp;一、客户委托项目</td></tr>
  <tr>
      <td align="center" width="23%" style="background:#FBFBFB">发货地 (国家和地区)</td>
      <td align="center" width="23%" style="background:#FBFBFB">收货地 (国家和地区)</td>
      <td align="center" width="23%" style="background:#FBFBFB">包裹发出所在仓库<span style="color: Red;">(务必正确选择)</span></td>
      <td align="center" width="23%" style="background:#FBFBFB">转运方式</td>
  </tr><tr>
      <td align="center">
      <select name="FromCountry" id="FromCountry" onchange="class_Change(this.value,'ToCountry');$('#FaHuoDi').val($(this).find('option:selected').attr('rel'))" class="select_class">
      <option value="0">=请选择=</option>
      <?php $_from = $this->_var['regions']['0']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'list');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['list']):
?>
      <option value="<?php echo $this->_var['key']; ?>" rel="<?php echo $this->_var['list']; ?>" <?php if ($this->_var['choose_xiangmu']['0'] == $this->_var['key']): ?>selected="selected"<?php endif; ?>><?php echo $this->_var['list']; ?></option>
      <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
      </select>
      </td>
      <td align="center">
      <select name="ToCountry" id="ToCountry" onchange="class_Change(this.value,'ExpressCompany');$('#ShouHuoDi').val($(this).find('option:selected').attr('rel'))" class="select_class">
      <option value="0">=请选择=</option>
      <?php $_from = $this->_var['regions']['1']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'list');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['list']):
?>
      <option value="<?php echo $this->_var['key']; ?>" rel="<?php echo $this->_var['list']; ?>" <?php if ($this->_var['choose_xiangmu']['1'] == $this->_var['key']): ?>selected="selected"<?php endif; ?>><?php echo $this->_var['list']; ?></option>
      <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>      
      </select>
      </td>
      <td align="center">
      <select name="ExpressCompany" id="ExpressCompany" onchange="class_Change(this.value,'TransportType');$('#CangKuDiZhi').val($(this).find('option:selected').attr('rel'))" class="select_class">
      <option value="0">=请选择=</option>
      <?php $_from = $this->_var['regions']['2']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'list');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['list']):
?>
      <option value="<?php echo $this->_var['key']; ?>" rel="<?php echo $this->_var['list']; ?>" <?php if ($this->_var['choose_xiangmu']['2'] == $this->_var['key']): ?>selected="selected"<?php endif; ?>><?php echo $this->_var['list']; ?></option>
      <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>       
      </select>
      </td>
      <td align="center">
      <select name="TransportType" id="TransportType" onchange="$('#ZhuanYunFangShi').val($(this).find('option:selected').attr('rel'))" class="select_class">
      <option value="0">=请选择=</option>
      <?php $_from = $this->_var['regions']['3']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'list');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['list']):
?>
      <option value="<?php echo $this->_var['key']; ?>" rel="<?php echo $this->_var['list']; ?>" <?php if ($this->_var['choose_xiangmu']['3'] == $this->_var['key']): ?>selected="selected"<?php endif; ?>><?php echo $this->_var['list']; ?></option>
      <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>       
      </select>
      </td>
  </tr>
  <tr <?php if ($this->_var['order_info']['order_id'] && ! $this->_var['order_info']['xiangmu']): ?><?php else: ?>style="display:none"<?php endif; ?>>
      <td align="center"><input type="input" class="inputBorder" style="width:80px" name="FaHuoDi" id="FaHuoDi" value="<?php echo $this->_var['order_info']['FaHuoDi']; ?>"/></td>
      <td align="center"><input type="input" class="inputBorder" style="width:80px" name="ShouHuoDi" id="ShouHuoDi" value="<?php echo $this->_var['order_info']['ShouHuoDi']; ?>"/></td>
      <td align="center"><input type="input" class="inputBorder" style="width:80px" name="CangKuDiZhi" id="CangKuDiZhi" value="<?php echo $this->_var['order_info']['CangKuDiZhi']; ?>"/></td>
      <td align="center"><input type="input" class="inputBorder" style="width:80px" name="ZhuanYunFangShi" id="ZhuanYunFangShi" value="<?php echo $this->_var['order_info']['ZhuanYunFangShi']; ?>"/></td>
  </tr>
  <tr>  
      <td align="center" height="25" colspan="4"><span style="color:Blue;">友情提示：网站发货的收货地址即为正确的收货仓库，请正确核对会员中心提供的地址选择，如因客户选择错误不能及时发货造成的所有问题由客户本人承担。</span></td>
  </tr>
</table>
<table width="100%" cellspacing="1" class="kdorder_add" style="margin-top:15px" id="wupin_add">
  <tr><td colspan="4" class="title_h1">&nbsp;二、快件物品详情(最多4个包裹) <font style="font-size:13px;color:#F00">(请如实填写，品牌，品名，规格 ，型号和价值。 否则造成海关退运，一切费用和责任由寄件人承担)</font></td></tr>
  <tr>
      <td align="center" style="background:#FFFFE5">商家发货跟踪号</td>
      <td width="420" align="center" style="background:#FFFFE5">商品明细(<font color="red">品牌务必如实填写,没有品牌或者品牌不符,容易扣关</font>)</td>
      <td align="center" style="background:#FFFFE5">数量</td>
      <td align="center" style="background:#FFFFE5">申报价值（$）</td>
  </tr>
  <?php $_from = $this->_var['order_info']['goodswupin']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'wupin');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['wupin']):
?>
  <tr id="wupin_id_<?php echo($this->_var['key']+3);?>">
    <td align="center">
    <img src="<?php echo $this->res_base . "/" . 'images/about/baoguo_del.gif'; ?>" align="absmiddle" style="cursor:pointer" title="删除该行包裹" onclick="deletes('wupin_id_<?php echo($this->_var['key']+3);?>')"/>&nbsp;
    <select name="PostOfficeID[]" id="PostOfficeID" onchange="postofficchange(this,'wupin_id_<?php echo($this->_var['key']+3);?>');" class="select_class">
    <option value="">请选择</option>
    <?php $_from = $this->_var['kuaidi_data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('i', 'list');if (count($_from)):
    foreach ($_from AS $this->_var['i'] => $this->_var['list']):
?><?php if ($this->_var['list']['type'] == "1"): ?>
    <option value="<?php echo $this->_var['list']['title']; ?>" <?php if ($this->_var['wupin']['PostOfficeID'] == $this->_var['list']['title']): ?>selected="selected"<?php endif; ?>><?php echo $this->_var['list']['title']; ?></option>
    <?php endif; ?><?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
    </select>
    <input name="PostNumber[]" type="text" class="inputBorder" id="PostNumber" style="width:120px" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')" value="<?php echo $this->_var['wupin']['yundanhao']; ?>" size="30" maxlength="30"/>
    <input type="hidden" name="yubao_id[]" id="yubao_id" value="<?php echo $this->_var['wupin']['yubao_id']; ?>"/>

    </td>
    <td align="center">
    <input type="text" class="inputBorder" style="width:320px;color:Gray;" id="GoodsName" name="GoodsName[]" value="<?php echo ($this->_var['wupin']['GoodsName'] == '') ? '选择物品' : $this->_var['wupin']['GoodsName']; ?>" onfocus="ClearsText(this);" readonly="readonly" title="请选择物品品牌和详细品名" <?php if (! $this->_var['order_info']['order_id']): ?>onclick="javascript:wpxz('wupin_id_<?php echo($this->_var['key']+3);?>')"<?php endif; ?> onblur="FileText(this);"/>
    <a href="javascript:wpxz('wupin_id_<?php echo($this->_var['key']+3);?>');" style="color:blue;">选择物品</a>&nbsp;&nbsp;<a href="javascript:ClearItem('wupin_id_<?php echo($this->_var['key']+3);?>');" style="color: red;">清除</a>
    </td>
    <td align="center"><input name="GoodsCount[]" type="text" class="inputBorder" id="GoodsCount" style="text-align:center;width:50px;" onblur="Sum();" onkeyup="clearNoNum(this)" value="<?php echo ($this->_var['wupin']['GoodsCount'] == '') ? '0' : $this->_var['wupin']['GoodsCount']; ?>" maxlength="3"/></td>
    <td align="center"><input type="text" style="text-align:right;width:50px" name="GoodsWorth[]" id="GoodsWorth" onkeyup="clearNoNum(this)" onblur="Sum();" value="<?php echo ($this->_var['wupin']['GoodsWorth'] == '') ? '0' : $this->_var['wupin']['GoodsWorth']; ?>" class="inputBorder"/></td>
  </tr>
  <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
</table>
<table width="100%" cellspacing="0" class="kdorder_add" style="border:1px #dddddd solid;border-top:0">
  <tr>
    <td align="left" style="background:#f0f7ff"><img src="<?php echo $this->res_base . "/" . 'images/about/baoguo_add.gif'; ?>" title="最多可添加4个包裹（拼箱费为运费的10%），如果不选择合箱，请另外填写一张新的运单" onclick="tbladdrows(1);" style="cursor:pointer;float:left"/><span style="float:left; height:29px; line-height:29px; color:#F00">&nbsp;拼箱请点击左边"添加包裹"按钮，最多可添加4个包裹（拼箱费为运费的10%）</span></td>
    <td align="right" style="background:#f0f7ff">
    物品数量合计：<input name="SumGoodsAmount" type="text" id="SumGoodsAmount" class="inputBorder" size="10" value="<?php echo $this->_var['order_info']['SumGoodsAmount']; ?>" style="width:50px" onkeyup="clearNoNum(this)"/>&nbsp;&nbsp;
    物品价值合计：<input name="SumGoodsWorth" type="text" id="SumGoodsWorth" class="inputBorder" size="10" value="<?php echo $this->_var['order_info']['SumGoodsWorth']; ?>" style="width:50px" onkeyup="clearNoNum(this)"/>      
    </td>
  </tr>            
</table>
<table width="100%" cellspacing="1" class="kdorder_add" style="margin-top:15px;font-family:simsun">
  <tr><td class="title_h1">&nbsp;三、选择服务项目</td></tr>
  <tr>
      <td align="center">
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
       <tr><td><ul class="fuwu_xz">
       <?php $_from = $this->_var['fuwu_data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'list');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['list']):
?>
       <?php if ($this->_var['list']['title'] != "保险" && $this->_var['list']['title'] != "小件物品单件加固" && $this->_var['list']['title'] != "拼箱"): ?>
       <li><label><input name="ServiceItems[]" type="checkbox" value="<?php echo $this->_var['key']; ?>" <?php if ($this->_var['list']['check'] > 0): ?>checked="checked"<?php endif; ?> /> <?php echo $this->_var['list']['title']; ?> <font color="#FF0000">$<?php echo $this->_var['list']['amount']; ?></font>/<?php echo $this->_var['list']['link']; ?></label></li>
       <?php endif; ?>
       <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
       </ul></td></tr><tr><td colspan="3" style="padding:0 8px"><div style="float:left;"><label><input name="ServiceItemsFix" id="ServiceItemsFix" type="checkbox"  value="10" onclick="IsDivideShow('ServiceItemsFix','singleDiv');" <?php if ($this->_var['ServiceItems']['Fix']['0'] > 0): ?>checked="checked"<?php endif; ?>/> 小件物品单件加固 <font color="#FF0000">$<?php echo $this->_var['fuwu_data']['10']['amount']; ?>/</font><?php echo $this->_var['fuwu_data']['10']['link']; ?></label></div><div id="singleDiv" style="display:<?php if ($this->_var['ServiceItems']['Fix']['0'] > 0): ?>block<?php else: ?>none<?php endif; ?>"> &nbsp;加固数量 <input name="SinglgFixAmount" type="text" id="SinglgFixAmount" onkeyup="clearNoNum(this)" value="<?php echo $this->_var['ServiceItems']['Fix']['1']; ?>" size="5" maxlength="3"/> 加固物品说明 <input name="SingleFixMemo" type="text" id="SingleFixMemo" value="<?php echo $this->_var['ServiceItems']['Fix']['2']; ?>" maxlength="200"/></div></td></tr><tr><td colspan="1" style="padding:0"><table cellspacing="0"><tr><td width="55" nowrap="nowrap"><label><input name="ServiceItemsBx" id="ServiceItemsBx" type="checkbox" value="11" onclick="IsDivideShow('ServiceItemsBx','protectDiv');" <?php if ($this->_var['ServiceItems']['Bx']['0'] > 0): ?>checked="checked"<?php endif; ?>/> 保险</label></td><td width="300" nowrap="nowrap"><div id="protectDiv" style="display:<?php if ($this->_var['ServiceItems']['Bx']['0'] > 0): ?>block<?php else: ?>none<?php endif; ?>">保价金额：$<input type="text" id="ProtectAmount" style="width: 40px;" size="3" name="ProtectAmount" onkeyup="clearNoNumbx(this)" value="<?php echo $this->_var['ServiceItems']['Bx']['1']; ?>"/>  收取费用(保价金额的<?php echo $this->_var['fuwu_data']['11']['amount']; ?><?php echo $this->_var['fuwu_data']['11']['link']; ?>)</div></td><td><div style="width:270px; border:1px #FFCC33 solid; background:#ffffe5; padding:8px;"><img src="<?php echo $this->res_base . "/" . 'images/about/msg_bg.jpg'; ?>" width="15" height="16" align="absbottom" />因丢货产生的赔偿说明请查看?<a target="_blank" href="/ex_insurance.html" style="color:#00F">投保协议&gt;&gt;</a></div></td></tr></table></td></tr>
      </table>
      </td>
  </tr>
</table>
<table width="100%" cellspacing="1" class="kdorder_add" style="margin-top:15px;font-family:simsun">
  <tr><td class="title_h1">&nbsp;四、填写发货地址</td></tr>
  <tr>
    <td><input name="extm_id" type="hidden" value="<?php echo $this->_var['order_info']['extm_id']; ?>"/>
    <?php if ($this->_var['my_address']['2']): ?>
    <?php $_from = $this->_var['my_address']['2']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'address');$this->_foreach['address_select'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['address_select']['total'] > 0):
    foreach ($_from AS $this->_var['address']):
        $this->_foreach['address_select']['iteration']++;
?>
    <div class="receive_add address_item">
    <label><input id="address_<?php echo $this->_var['address']['addr_id']; ?>" type="radio" name="address_options" value="<?php echo $this->_var['address']['addr_id']; ?>" class="radio" <?php if ($this->_var['order_info']['txt_id'] == $this->_var['address']['addr_id'] || ( ! $this->_var['order_info']['order_id'] && $this->_var['address']['default_use'] == 1 )): ?>checked="true"<?php endif; ?>/>
    <?php echo htmlspecialchars($this->_var['address']['consignee']); ?><?php echo htmlspecialchars($this->_var['address']['region_name']); ?>&nbsp;&nbsp;<?php echo str_replace('//', ' ', $this->_var['address']['txt_countrys']); ?><?php echo htmlspecialchars($this->_var['address']['address']); ?>&nbsp;&nbsp;<?php if ($this->_var['address']['phone_mob']): ?><?php echo $this->_var['address']['phone_mob']; ?><?php else: ?><?php echo $this->_var['address']['phone_tel']; ?><?php endif; ?>&nbsp;&nbsp;<?php echo htmlspecialchars($this->_var['address']['zipcode']); ?></label>
    <INPUT id="on_pro_<?php echo $this->_var['address']['addr_id']; ?>" type="hidden" value="<?php echo $this->_var['address']['parents_region_id']; ?>">
    </div>
    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>    
    <div class="new_receive_add address_item" style="color:#F00"><label><input type="radio" name="address_options" id="use_new_address" value="0" /> 填写新地址</label></div>
    <?php endif; ?>
    <table border="0" cellpadding="2" cellspacing="1" class="adders_cass" id="address_form">
      <tr>
        <td align="right" width="102"><em>*</em>寄件人：</td>
        <td><input name="txt_name" type="text" class="inputBorder" id="txt_name" value="<?php echo $this->_var['order_info']['txt_name']; ?>" maxlength="20"/>&nbsp;&nbsp;&nbsp;&nbsp;
          公司名称：<input name="txt_company" type="text" class="inputBorder" id="txt_company" value="<?php echo $this->_var['order_info']['txt_company']; ?>" maxlength="250"/>
          </td>
      </tr>
      <tr>
        <td align="right"><em>*</em>手机/电话：</td>
        <td><input name="txt_mobilephone" type="text" class="inputBorder" id="txt_mobilephone" value="<?php echo $this->_var['order_info']['txt_mobilephone']; ?>" maxlength="30"/>&nbsp;&nbsp;&nbsp;&nbsp;
        邮箱地址：<input name="txt_email" type="text" class="inputBorder" id="txt_email" value="<?php echo $this->_var['order_info']['txt_email']; ?>" maxlength="30" placeholder="Email地址"/></td>
      </tr>
      <tr>
          <td align="right"><em>*</em>国家/地区：</td>
          <td><input name="txt_country" type="text" class="inputBorder" id="txt_country" style="width:80px;" value="<?php echo $this->_var['order_info']['txt_country']; ?>" maxlength="30" placeholder="国家/地区"/>&nbsp;
            省/州：<input name="txt_province" type="text" class="inputBorder" id="txt_province" style="width:80px;" value="<?php echo $this->_var['order_info']['txt_province']; ?>" maxlength="30" placeholder="省/州"/>&nbsp;
            城市：<input name="txt_city" type="text" class="inputBorder" id="txt_city" style="width:80px;" value="<?php echo $this->_var['order_info']['txt_city']; ?>" maxlength="30" placeholder="城市"/>&nbsp;
            邮编：<input name="txt_postoffice" type="text" class="inputBorder" id="txt_postoffice" style="width:70px;" onkeyup="clearNoNum(this)" value="<?php echo $this->_var['order_info']['txt_postoffice']; ?>" maxlength="20" placeholder="邮政编码"/></td>
          </tr>
      <tr>
          <td align="right"><em>*</em>详细地址：</td>
          <td><input name="txt_address" type="text" class="inputBorder" id="txt_address" value="<?php echo $this->_var['order_info']['txt_address']; ?>" size="50" maxlength="255"/>
          <label><input name="save_address" type="checkbox" id="save_address" value="1" <?php if (! $this->_var['my_address']): ?>checked="checked"<?php endif; ?>>&nbsp;<font color="#FF0000">保存到地址薄</font></label></td>
      </tr>
	</table>
    </td>
  </tr>
</table>
<table width="100%" cellspacing="1" class="kdorder_add" style="margin-top:15px;font-family:simsun">
  <tr><td class="title_h1">&nbsp;五、填写收货地址 <font style="font-size:13px;color:red">(注意:普通件,收件人身份证号码必填)</font></td></tr>
  <tr>
    <td>
    <?php if ($this->_var['my_address']['1']): ?>
    <?php $_from = $this->_var['my_address']['1']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'address');$this->_foreach['address_select'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['address_select']['total'] > 0):
    foreach ($_from AS $this->_var['address']):
        $this->_foreach['address_select']['iteration']++;
?>
    <div class="receive_add address_item">

    <label><input id="address_<?php echo $this->_var['address']['addr_id']; ?>" type="radio" name="address_options1" value="<?php echo $this->_var['address']['addr_id']; ?>" class="radio" <?php if ($this->_var['order_info']['txtRece_id'] == $this->_var['address']['addr_id'] || ( ! $this->_var['order_info']['order_id'] && $this->_var['address']['default_use'] == 1 )): ?>checked="true"<?php endif; ?>/>
    <?php echo htmlspecialchars($this->_var['address']['consignee']); ?><?php echo htmlspecialchars($this->_var['address']['region_name']); ?>&nbsp;&nbsp;<?php echo str_replace('//', ' ', $this->_var['address']['txt_countrys']); ?><?php echo htmlspecialchars($this->_var['address']['address']); ?>&nbsp;&nbsp;<?php if ($this->_var['address']['phone_mob']): ?><?php echo $this->_var['address']['phone_mob']; ?><?php else: ?><?php echo $this->_var['address']['phone_tel']; ?><?php endif; ?>&nbsp;&nbsp;<?php echo htmlspecialchars($this->_var['address']['zipcode']); ?></label>
    <INPUT id="on_pro_<?php echo $this->_var['address']['addr_id']; ?>" type="hidden" value="<?php echo $this->_var['address']['parents_region_id']; ?>">
    </div>
    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>    
    <div class="new_receive_add address_item" style="color:#F00"><label><input type="radio" name="address_options1" id="use_new_address" value="0"/> 填写新地址</label></div>   
    <?php endif; ?>  
  <table border="0" cellpadding="2" cellspacing="1" class="adders_cass" id="address_form1">
    <tr>
      <td align="right" width="102"><em>*</em>收件人：</td>
      <td><input name="txtRece_name" type="text" class="inputBorder" id="txtRece_name" value="<?php echo $this->_var['order_info']['txtRece_name']; ?>" maxlength="20"/>&nbsp;&nbsp;&nbsp;&nbsp;
        公司名称：<input name="txtRece_company" type="text" id="txtRece_company" class="inputBorder" value="<?php echo $this->_var['order_info']['txtRece_company']; ?>"/>
        </td>
    </tr>
    <tr>
      <td align="right"><em>*</em>手机/电话：</td>
      <td><input name="txtRece_mobilephone" type="text" class="inputBorder" id="txtRece_mobilephone" value="<?php echo $this->_var['order_info']['txtRece_mobilephone']; ?>" maxlength="30"/>&nbsp;&nbsp;&nbsp;&nbsp;
      邮箱地址：<input name="txtRece_email" type="text" class="inputBorder" id="txtRece_email" value="<?php echo $this->_var['order_info']['txtRece_email']; ?>" maxlength="30" placeholder="Email地址"/></td>
    </tr>
    <tr>
        <td align="right"><em>*</em>国家/地区：</td>
        <td><input name="txtRece_country" type="text" class="inputBorder" id="txtRece_country" style="width:80px;" value="<?php echo $this->_var['order_info']['txtRece_country']; ?>" maxlength="30" placeholder="国家/地区"/>&nbsp;
          省/州：<input name="txtRece_province" type="text" class="inputBorder" id="txtRece_province" style="width:80px;" value="<?php echo $this->_var['order_info']['txtRece_province']; ?>" maxlength="30" placeholder="省/州"/>&nbsp;
          城市：<input name="txtRece_city" type="text" class="inputBorder" id="txtRece_city" style="width:80px;" value="<?php echo $this->_var['order_info']['txtRece_city']; ?>" maxlength="30" placeholder="城市"/>&nbsp;
          区：<input name="txtqu" type="text" class="inputBorder" id="txtqu" style="width:80px;" value="<?php echo $this->_var['order_info']['txtqu']; ?>" maxlength="30" placeholder="区"/>&nbsp;
          邮编：<input name="txtRece_postoffice" type="text" class="inputBorder" id="txtRece_postoffice" style="width:70px;" onkeyup="clearNoNum(this)" value="<?php echo $this->_var['order_info']['txtRece_postoffice']; ?>" maxlength="20" placeholder="邮政编码"/></td>
        </tr>
    <tr>
        <td align="right"><em>*</em>详细地址：</td>
        <td><input name="txtRece_address" type="text" class="inputBorder" id="txtRece_address" value="<?php echo $this->_var['order_info']['txtRece_address']; ?>" size="50" maxlength="255"/>
        <label><input id="rbtnyes" type="radio" name="idpic" value="rbtnyes" <?php if ($this->_var['order_info']['idpic'] != 'rbtnno'): ?>checked="checked"<?php endif; ?>/> 大陆地区</label>
        <label><input id="rbtnno" type="radio" name="idpic" value="rbtnno" <?php if ($this->_var['order_info']['idpic'] == 'rbtnno'): ?>checked="checked"<?php endif; ?>/> 非大陆地区</label></td>
    </tr>
    <tr>
        <td align="right"><em>*</em>身份证号码：</td>
        <td><input name="txtidcode" type="text" class="inputBorder" id="txtidcode" value="<?php echo $this->_var['order_info']['txtidcode']; ?>" size="50" maxlength="30" placeholder="身份证号码必填方便清关"/>
        <label><input name="save_address1" type="checkbox" id="save_address1" value="1" <?php if (! $this->_var['my_address']): ?>checked="checked"<?php endif; ?>>&nbsp;<font color="#FF0000">保存到地址薄</font></label></td>
    </tr>      
  </table>  
    </td>
  </tr>
</table>
<table width="100%" cellspacing="1" class="kdorder_add" style="margin-top:15px;font-family:simsun">
  <tr><td class="title_h1">&nbsp;六、运单备注 <font style="font-size:13px;color:red">(我们并不能满足您所有的备注要求，有其他要求请先与您的客服联系确认后填写)</font></td></tr>
  <tr>
    <td><textarea name="Memo" id="Memo" style="border:1px solid #E8E8E8;width:97%;height:80px;padding:8px;" placeholder="如果其他要求请填写备注"><?php echo $this->_var['order_info']['Memo']; ?></textarea></td>
  </tr>
</table>
<div style="margin: 10px;padding-bottom: 15px;">
  <?php if ($this->_var['order_info']['status'] <= 0): ?>
  <input name="agree" type="checkbox" value="1" id="agree" checked="checked"/> <a href="<?php echo $this->_var['site_url']; ?>/<?php echo url('app=article&act=abouts&code=customer'); ?>" target="_blank"><font color="red">我已了解并同意各项服务条款，同时并接受物品签收前，必须核实重量和开箱检查，发现缺重或缺货，须由送件人出具证明，否则本公司不承担任何责任。</font></a><br /><br /><a id="mod_yundanhao"></a>
  <input type="button" name="imgButton" class="botton_submit" value="确认提交" onclick="return Check_form();" />
  <input type="button" name="imgButton" class="botton_submit" value="返回一页" onclick="history.go(-1)" style="background:#999"/>
  <?php else: ?><p style="font-size:15px; color:#F00">入库的运单不能修改资料</p>
  <?php endif; ?>
  <?php if ($this->_var['order_info']['order_id']): ?>
  <input type="hidden" name="order_id"  value="<?php echo $this->_var['order_info']['order_id']; ?>"/><input type="hidden" name="act"  value="edit"/>
  <?php else: ?>
  <input type="hidden" name="act"  value="add"/>
  <?php endif; ?>
</div>
</form>
<script type="text/javascript">
var addresses = <?php echo $this->_var['my_address_json']; ?>;
$(function(){
    $('input[name="address_options"]').click(function(){
        $(this).attr('checked', true);
		$('input[name="save_address"]').attr("checked",'true');
        set_address(1,'click');
    });	
    $('input[name="address_options1"]').click(function(){
        $(this).attr('checked', true);
		$('input[name="save_address1"]').attr("checked",'true');
		set_address(2,'click');
    });							
    set_address(1);
	set_address(2);
});
function set_address(whereID,Clicks){
 if(whereID==2){
    var addr_id = $("input[name='address_options1']:checked").val();
    if(addr_id == 0 || typeof(addr_id) == 'undefined'){
		if(addr_id == 0 && Clicks == 'click'){
		$('#txtRece_name').val(""); $('#txtRece_company').val(""); $('#txtRece_mobilephone').val(""); $('#txtRece_email').val("");$('#txtRece_country').val(""); $('#txtRece_province').val(""); $('#txtRece_city').val("");$('#txtqu').val(""); 
		$('#txtRece_postoffice').val(""); $('#txtRece_address').val("");$('#txtidcode').val("");$("input[type=radio][name=idpic][value='rbtnyes']").attr("checked",true); 
		}
		$("input[type=radio][name=address_options1][value='0']").attr("checked",true); 
		$('#address_form1').show();			
    }else{
		var addr_data = addresses[addr_id];		
		$('#address_form1').hide();
		$("input[name='txtRece_name']").val(addr_data['consignee']);
		$("input[name='txtRece_company']").val(addr_data['txt_company']);
		$("input[name='txtRece_mobilephone']").val(addr_data['phone_mob']);
		$("input[name='txtRece_email']").val(addr_data['txt_email']);
		var split_trys = addr_data['txt_countrys'].split("//"); //字符国家省市
		$("input[name='txtRece_country']").val(split_trys[0]);
		$("input[name='txtRece_province']").val(split_trys[1]);
		$("input[name='txtRece_city']").val(split_trys[2]);
		$("input[name='txtqu']").val(split_trys[3]);
		$("input[name='txtRece_postoffice']").val(addr_data['zipcode']);
		$("input[name='txtRece_address']").val(addr_data['address']);
		if(addr_data['idpic']=='rbtnyes'){
			$("input[type=radio][name=idpic][value='rbtnyes']").attr("checked",true);  
		}else{
			$("input[type=radio][name=idpic][value='rbtnno']").attr("checked",true);  
		}
		$("input[name='txtidcode']").val(addr_data['txtidcode']);	
    }
 }else{
    var addr_id = $("input[name='address_options']:checked").val();
    if(addr_id == 0 || typeof(addr_id) == 'undefined'){
		if(addr_id == 0 && Clicks == 'click'){
		$('#txt_name').val(""); $('#txt_company').val(""); $('#txt_mobilephone').val(""); $('#txt_email').val("");$('#txt_country').val(""); $('#txt_province').val(""); $('#txt_city').val(""); $('#txt_postoffice').val(""); $('#txt_address').val("");
		}
		$("input[type=radio][name=address_options][value='0']").attr("checked",true); 
		$('#address_form').show();
    }else{
		var addr_data = addresses[addr_id];	
		$('#address_form').hide();
		$("input[name='txt_name']").val(addr_data['consignee']);
		$("input[name='txt_company']").val(addr_data['txt_company']);
		$("input[name='txt_mobilephone']").val(addr_data['phone_mob']);
		$("input[name='txt_email']").val(addr_data['txt_email']);
		var split_trys = addr_data['txt_countrys'].split("//"); //字符国家省市
		$("input[name='txt_country']").val(split_trys[0]);
		$("input[name='txt_province']").val(split_trys[1]);
		$("input[name='txt_city']").val(split_trys[2]);
		$("input[name='txt_postoffice']").val(addr_data['zipcode']);
		$("input[name='txt_address']").val(addr_data['address']);
    }	
 }
}
//sumbit form
function Check_form() {
  if ($("#FromCountry").val() == "0" && $("#FaHuoDi").val() == "") {alert("请选择发货地");$("#FromCountry").focus(); return false;}
  if ($("#ToCountry").val() == "0" && $("#ShouHuoDi").val() == "") {alert("请选择收货地");$("#ToCountry").focus(); return false;}
  if ($("#ExpressCompany").val() == "0" && $("#CangKuDiZhi").val() == "") {alert("请选择所在仓库");$("#ExpressCompany").focus(); return false;}
  if ($("#TransportType").val() == "0" && $("#ZhuanYunFangShi").val() == "") {alert("请选择转运方式");$("#TransportType").focus(); return false;}  
  for (var i = 0; i < document.getElementsByName("GoodsName[]").length; i++) {
      if (document.getElementsByName("GoodsName[]")[i].value == "" || document.getElementsByName("GoodsName[]")[i].value == "选择物品") {
		  alert("物品名不能为空"); return false;
	  }
	  if (document.getElementsByName("GoodsCount[]")[i].value == "" || document.getElementsByName("GoodsCount[]")[i].value == "0") {
		  alert("物品数量不能为空且必须大于0");document.getElementsByName("GoodsCount[]")[i].focus(); return false;
	  }
	  if (document.getElementsByName("GoodsWorth[]")[i].value == "" || document.getElementsByName("GoodsWorth[]")[i].value == "0") {
		  alert("物品价值不能为空且必须大于0");document.getElementsByName("GoodsWorth[]")[i].focus(); return false;
	  }
  }
  if ($("#ServiceItemsFix")) {
	  if ($("#ServiceItemsFix").attr("checked")) {
		  if ($("#SinglgFixAmount").val() == "") {alert("内部单件物品加固数量不能为空");$("#SinglgFixAmount").focus(); return false;}
		  if ($("#SingleFixMemo").val() == "") {alert("内部单件物品加固备注不能为空");$("#SingleFixMemo").focus(); return false;}
	  }
  }
  if ($("#ServiceItemsBx")) {
	  if ($("#ServiceItemsBx").attr("checked")) {
		  if ($("#ProtectAmount").val() == "") {alert("保价金额不能为空");$("#ProtectAmount").focus(); return false;}
	  }
  }
  var flag = false;
  if ($("#txt_name").val() == "") {alert("寄件人姓名不能为空");$("#txt_name").focus(); return false;}
  if ($("#txt_mobilephone").val() == "") { 
	  alert("寄件人手机/电话不能为空");$("#txt_mobilephone").focus(); return false; 
  }else{
	  var newstr = $("#txt_mobilephone").val().replace(/\-/g, "");
	  if(/^[0-9\\-]*$/.test($("#txt_mobilephone").val()) == false){alert("手机/电话只能输入数字或者-横线，请正确输入");$("#txt_mobilephone").focus(); return false;}
	  if(newstr.length < 10 || newstr.length > 13){alert("您输入的寄件人手机/电话的格式有误，请输入10-13位的手机/电话号码");$("#txt_mobilephone").focus(); return false;}	  
  }
  if($("#txt_email").val() != "" && (/^(?:\w+\.?)*\w+@(?:\w+\.)*\w+$/.test($("#txt_email").val())) == false ){
	  alert("您输入的寄件人邮箱地址格式有误，请正确输入");$("#txt_email").focus(); return false; 
  }
  if ($("#txt_country").val() == "") {alert("寄件人所在国家不能为空");$("#txt_country").focus(); return false;}
  if ($("#txt_province").val() == "") {alert("寄件人所在省/州不能为空");$("#txt_province").focus(); return false;}
  if ($("#txt_city").val() == "") {alert("寄件人所在城市不能为空");$("#txt_city").focus(); return false;}
  if ($("#txt_address").val() == "") {alert("寄件人详细地址不能为空");$("#txt_address").focus(); return false;}
  flag = false;
  if ($("#txtRece_name").val() == "") {alert("收件人姓名不能为空");$("#txtRece_name").focus(); return false;}
  if ($("#txtRece_mobilephone").val() == "") { 
      alert("收件人手机/电话不能为空");$("#txtRece_mobilephone").focus(); return false; 
  }else{
	  if(checkTel($("#txtRece_mobilephone").val()) == false){alert("错误的格式，请输入中国地区正确的手机号码或者电话号码");$("#txtRece_mobilephone").focus(); return false;}
  }
  if($("#txtRece_email").val() != "" && (/^(?:\w+\.?)*\w+@(?:\w+\.)*\w+$/.test($("#txtRece_email").val())) == false ){
	  alert("您输入的收件人邮箱地址格式有误，请正确输入");$("#txtRece_email").focus(); return false; 
  }
  if ($("#txtRece_country").val() == "") {alert("收件人所在国家不能为空");$("#txtRece_country").focus(); return false;}
  if ($("#txtRece_province").val() == "") {alert("收件人所在省/州不能为空");$("#txtRece_province").focus(); return false;}
  if ($("#txtRece_city").val() == "") {alert("收件人所在城市不能为空");$("#txtRece_city").focus(); return false;}
  if ($("#txtRece_address").val() == "") {alert("收件人详细地址不能为空");$("#txtRece_address").focus(); return false;}
  if ($("#txtidcode").val() == "") { 
     alert("收件人身份证号码不能为空");$("#txtidcode").focus(); return false; 
  }else{
	 if ($("#txtidcode").val().length != 15 && $("#txtidcode").val().length != 18) {
		  alert("输入身份证号码格式不正确，必须是15位或者18位的有效号码!");
		  $("#txtidcode").focus();
		  return (false);
	  }
  }
  if (!$("#agree").attr("checked")) {alert("请选择是否同意条款");$("#agree").focus(); return false;}
  $("#form_box").submit();
}

function ClearItem(wupin_id) {
	$("#" + wupin_id).find("#GoodsName").val('选择物品');
	$("#" + wupin_id).find("#GoodsCount").val('0');
	$("#" + wupin_id).find("#GoodsWorth").val('0');
}
function postofficchange(j, d) {
  var content = j.options[j.selectedIndex].text;
  if (content == "送货上门" || content == "司机取件") {
	  $("#"+d+" #PostNumber").val('无跟踪号');
  } else {
	  if($("#"+d+" #PostNumber").val() == "无跟踪号")  $("#"+d+" #PostNumber").val('');
  }
}
function IsDivideShow(id1,id2){ 
  if($("#"+id1).attr("checked")){ 
    $("#"+id2).show(); 
  }else{ 
    $("#"+id2).hide(); 
  } 
}
function wpxz(wupin_id) {dialog("选择物品","iframe:/index.php?app=kd_order&act=wpxz&come="+wupin_id,"790","300","");}
function checkTel(value){
	var isPhone = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
	var isMob=/^((\+?86)|(\(\+86\)))?(13[0123456789][0-9]{8}|15[012356789][0-9]{8}|18[02356789][0-9]{8}|147[0-9]{8})$/;
	if(isMob.test(value)||isPhone.test(value)){
		return true;
	}else{
		return false;
	}
}
</script>

<?php elseif ($_GET['act'] == 'import'): ?>
<style>
.kdorder_add th {font-size:13px; color:#333; background:#f0f7ff; width:150px; font-weight:normal;text-align:right; padding-right:5px;}
.kdorder_add th em {font-style:normal; color:#F00; margin-right:8px}
</style>
<form method="post" enctype="multipart/form-data">
<table width="100%" cellspacing="1" class="kdorder_add">
  <tr><td colspan="2" style="padding:10px 8px;background:#ffffe5">重要提示：该功能是批量导入Excel表格的功能，请下载示例模板，按照示例模板的格式准确填写运单内容。</td></tr>
  <tr>
    <th><em>*</em>选择文件：</th>
    <td><input type="file" name="file" id="file" />&nbsp;&nbsp;&nbsp;&nbsp;<font color="#999999">如果导入速度较慢，建议您把文件拆分为几个小文件，然后分别导入</font></td>
  </tr>  
  <tr>
    <th>示例模板：</th>
    <td><a href="/data/files/mall/application/kdorder.xls" target="_blank">点击下载</a>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#999999">重要提示：请使用excel格式保存，表格中的字段名称需要填写正确，导入才不会出错。</font></td>
  </tr>
  <tr>
    <th>&nbsp;</th>
    <td>
    <input type="submit" class="botton_submit" value="确认导入"/>
    <input type="hidden" name="act"  value="import"/>
    </td>
 </tr>
</table>
</form>

<?php else: ?>

<style>
.order_form{color:#333}
.order_form td {font-size:13px}
.order_form h1 {padding:10px 0;width:100%;font-size:15px; color:#e52f21;overflow:hidden; font-family:'Microsoft Yahei'}
.order_form .title_h2 {text-align:right; width:120px; font-weight:bold;font-family:'Microsoft Yahei'}
.order_form .kdorder_add {margin-bottom:20px;}
</style>
<div class="order_form">
  <h1>运单基本信息</h1>
  <table cellspacing="1" width="100%" class="kdorder_add">
    <tr>
      <td class="title_h2" style="background:#FBFBFB">订单编号：</td>
      <td><?php echo $this->_var['order_info']['order_sn']; ?></td>
      <td class="title_h2" style="background:#FBFBFB">订单状态：</td>
      <td><?php if ($this->_var['order_info']['status'] == '0'): ?><font color="#f00">未入库</font>
            <?php elseif ($this->_var['order_info']['status'] == '1'): ?><font color="#FF9900">部分入库</font>
            <?php elseif ($this->_var['order_info']['status'] == '2'): ?><font color="#009966">已入库</font>
            <?php elseif ($this->_var['order_info']['status'] == '3'): ?><font color="#00f">待付款</font>
            <?php elseif ($this->_var['order_info']['status'] == '5'): ?><font color="#3399CC">已付款</font>
            <?php elseif ($this->_var['order_info']['status'] == '6'): ?><font color="#FF00FF">待发货</font>
            <?php elseif ($this->_var['order_info']['status'] == '7'): ?><font color="#336600">已发货</font>
            <?php elseif ($this->_var['order_info']['status'] == '8'): ?>已完成
            <?php elseif ($this->_var['order_info']['status'] == '9'): ?><font color="#999">已取消</font>
            <?php endif; ?></td>
    </tr>
    <tr>
      <td class="title_h2" style="background:#FBFBFB">运单号：</td>
      <td><a href="<?php echo $this->_var['site_url']; ?>/<?php echo url('app=kd_order&ydh=' . $this->_var['order_info']['yundanhao']. ''); ?>" target="_blank" class="links"><?php echo $this->_var['order_info']['yundanhao']; ?></a></td>
      <td class="title_h2" style="background:#FBFBFB"><span class="title_h2" style="background:#FBFBFB">发货快递单号：</span></td>
      <td><?php echo $this->_var['order_info']['express']; ?> <?php echo $this->_var['order_info']['expressNo']; ?><?php if ($this->_var['order_info']['express'] && $this->_var['order_info']['expressNo']): ?>&nbsp;<a href="http://www.baidu.com/s?wd=<?php echo $this->_var['order_info']['express']; ?><?php echo $this->_var['order_info']['expressNo']; ?>&ie=UTF-8" target="_blank" class="links">查物流</a><?php endif; ?></td>
    </tr>
    <tr>
      <td class="title_h2" style="background:#FBFBFB">下单日期：</td>
      <td><?php echo local_date("Y-m-d H:i:s",$this->_var['order_info']['addtime']); ?></td>
      <td class="title_h2" style="background:#FBFBFB"></td>
      <td>&nbsp;</td>
    </tr>
    <?php if ($this->_var['order_info']['totalfei'] > 0): ?>
    <tr>
      <td colspan="4" class="title_h1">费用明细</td></tr>
    <tr>
      <td class="title_h2">运费：</td>
      <td>$ <?php echo ($this->_var['order_info']['yunfei'] == '') ? '0' : $this->_var['order_info']['yunfei']; ?> 美元</td>
      <td class="title_h2">增值服务费：</td>
      <td>$ <?php echo ($this->_var['order_info']['fuwufei'] == '') ? '0' : $this->_var['order_info']['fuwufei']; ?> 美元 </td>
    </tr>
    <tr>
      <td class="title_h2">保险费：</td>
      <td>$ <?php echo ($this->_var['order_info']['baoxianfei'] == '') ? '0' : $this->_var['order_info']['baoxianfei']; ?> 美元</td>
      <td class="title_h2">仓库操作费：</td>
      <td>$ <?php echo ($this->_var['order_info']['caozuofei'] == '') ? '0' : $this->_var['order_info']['caozuofei']; ?> 美元</td>
    </tr>
    <tr>
      <td class="title_h2">关税：</td>
      <td>$ <?php echo ($this->_var['order_info']['guanshuifei'] == '') ? '0' : $this->_var['order_info']['guanshuifei']; ?> 美元</td>
      <td class="title_h2">仓储费：</td>
      <td>$ <?php echo ($this->_var['order_info']['cangchufei'] == '') ? '0' : $this->_var['order_info']['cangchufei']; ?> 美元 </td>
    </tr>
    <tr>
      <td class="title_h2">其它费用：</td>
      <td>$ <?php echo ($this->_var['order_info']['qitafei'] == '') ? '0' : $this->_var['order_info']['qitafei']; ?> 美元</td>
      <td style="color:#F00" class="title_h2">共需支付：</td>
      <td style="color:#F00">$ <?php echo ($this->_var['order_info']['totalfei'] == '') ? '0' : $this->_var['order_info']['totalfei']; ?> 美元。</td>
    </tr>
    <?php if ($this->_var['order_info']['Memo_fei']): ?>
    <tr>
      <td class="title_h2" valign="top">费用说明：</td>
      <td colspan="3"><?php echo(@ereg_replace("\r\n","<br />",$this->_var['order_info']['Memo_fei'])); ?></td>
    </tr>
    <?php endif; ?>
    <?php endif; ?>
    
  </table>  
  <table cellspacing="1" width="100%" class="kdorder_add">
    <tr><td colspan="4" class="title_h1">&nbsp;一、客户委托项目</td></tr>
    <tr>
      <td align="center" style="background:#FBFBFB">发货地 (国家和地区)</td>
      <td align="center" style="background:#FBFBFB">收货地 (国家和地区)</td>
      <td align="center" style="background:#FBFBFB">包裹发出所在仓库</td>
      <td align="center" style="background:#FBFBFB">转运方式</td>
    </tr><tr>
      <td align="center"><?php echo ($this->_var['order_info']['FaHuoDi'] == '') ? '-' : $this->_var['order_info']['FaHuoDi']; ?></td>
      <td align="center"><?php echo ($this->_var['order_info']['ShouHuoDi'] == '') ? '-' : $this->_var['order_info']['ShouHuoDi']; ?></td>
      <td align="center"><?php echo ($this->_var['order_info']['CangKuDiZhi'] == '') ? '-' : $this->_var['order_info']['CangKuDiZhi']; ?></td>
      <td align="center"><?php echo ($this->_var['order_info']['ZhuanYunFangShi'] == '') ? '-' : $this->_var['order_info']['ZhuanYunFangShi']; ?></td>
    </tr>
  </table>
  <table cellspacing="1" width="100%" class="kdorder_add">
    <tr><td colspan="4" class="title_h1">&nbsp;二、快件物品详情</td></tr>
    <tr>
        <td align="center" style="background:#FBFBFB">商家发货跟踪号</td>
        <td align="center" style="background:#FBFBFB">商品明细</td>
        <td align="center" style="background:#FBFBFB">数量</td>
        <td align="center" style="background:#FBFBFB">申报价值（$）</td>
    </tr>  
    <?php $_from = $this->_var['order_info']['goodswupin']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'wupin');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['wupin']):
?>
    <tr id="wupin_id_<?php echo($this->_var['key']+3);?>">
      <td align="center"><?php if ($this->_var['wupin']['PostOfficeID']): ?><?php echo $this->_var['wupin']['PostOfficeID']; ?>：<?php endif; ?><?php echo $this->_var['wupin']['yundanhao']; ?></td>
      <td align="center"><?php echo ($this->_var['wupin']['GoodsName'] == '') ? '-' : $this->_var['wupin']['GoodsName']; ?></td>
      <td align="center"><?php echo ($this->_var['wupin']['GoodsCount'] == '') ? '0' : $this->_var['wupin']['GoodsCount']; ?></td>
      <td align="center">$ <?php echo ($this->_var['wupin']['GoodsWorth'] == '') ? '0' : $this->_var['wupin']['GoodsWorth']; ?></td>
    </tr>
    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
    <tr id="wupin_id_<?php echo($this->_var['key']+3);?>">
    <td colspan="4" align="right">物品数量合计：<strong style="color:#F00"><?php echo $this->_var['order_info']['SumGoodsAmount']; ?></strong>&nbsp;&nbsp;&nbsp;&nbsp;物品价值合计：<strong style="color:#F00">$ <?php echo $this->_var['order_info']['SumGoodsWorth']; ?></strong></td>
    </tr>  
  </table> 
  <table width="100%" cellspacing="1" class="kdorder_add">
    <tr><td class="title_h1">&nbsp;三、服务项目</td></tr>
    <tr>
      <td>
      <ul class="fuwu_xz">
       <?php $_from = $this->_var['fuwu_data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'list');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['list']):
?>
       <?php if ($this->_var['list']['check'] > 0): ?><li>（√）<?php echo $this->_var['list']['title']; ?> <font color="#FF0000">$<?php echo $this->_var['list']['amount']; ?></font>/<?php echo $this->_var['list']['link']; ?></li><?php endif; ?>
       <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
       </ul>
       <?php if ($this->_var['ServiceItems']['Fix']['0'] > 0): ?><p style="padding:8px 0;">（√）小件物品单件加固 <font color="#FF0000">$<?php echo $this->_var['fuwu_data']['10']['amount']; ?>/</font><?php echo $this->_var['fuwu_data']['10']['link']; ?>&nbsp;&nbsp;加固数量：<?php echo $this->_var['ServiceItems']['Fix']['1']; ?>&nbsp;&nbsp;加固物品说明：<?php echo $this->_var['ServiceItems']['Fix']['2']; ?></p><?php endif; ?>
       <?php if ($this->_var['ServiceItems']['Bx']['0'] > 0): ?><p style="padding:8px 0">（√）保险&nbsp;&nbsp;保价金额：$<?php echo $this->_var['ServiceItems']['Bx']['1']; ?></p><?php endif; ?>
      </td>
    </tr>
  </table> 
  <table width="100%" cellspacing="1" class="kdorder_add">
    <tr><td colspan="4" class="title_h1">&nbsp;四、发货地址</td></tr>
    <tr>
        <td class="title_h2">寄件人：</td>
        <td><?php echo $this->_var['order_info']['txt_name']; ?></td>
        <td class="title_h2">公司名称：</td>
        <td><?php echo $this->_var['order_info']['txt_company']; ?></td>
    </tr>
    <tr>
      <td class="title_h2">手机/电话：</td>
      <td><?php echo $this->_var['order_info']['txt_mobilephone']; ?></td>
      <td class="title_h2">邮箱地址：</td>
      <td><?php echo $this->_var['order_info']['txt_email']; ?></td>
    </tr>
    <tr>
      <td class="title_h2">国家/地区：</td>
      <td><?php echo str_replace('//', ' ', $this->_var['order_info']['txt_countrys']); ?></td>
      <td class="title_h2">邮编：</td>
      <td><?php echo $this->_var['order_info']['txt_postoffice']; ?></td>
    </tr>
    <tr>
      <td class="title_h2">详细地址：</td>
      <td colspan="3"><?php echo $this->_var['order_info']['txt_address']; ?></td>
    </tr>
   </tr>
    <tr>
      <td colspan="4" height="5"></td>
      </tr>
   </tr>   
    <tr><td colspan="4" class="title_h1">&nbsp;五、收货地址</td></tr>
    <tr>
        <td class="title_h2">寄件人：</td>
        <td><?php echo $this->_var['order_info']['txtRece_name']; ?></td>
        <td class="title_h2">公司名称：</td>
        <td><?php echo $this->_var['order_info']['txtRece_company']; ?></td>
    </tr>
    <tr>
      <td class="title_h2">手机/电话：</td>
      <td><?php echo $this->_var['order_info']['txtRece_mobilephone']; ?></td>
      <td class="title_h2">邮箱地址：</td>
      <td><?php echo $this->_var['order_info']['txtRece_email']; ?></td>
    </tr>
    <tr>
      <td class="title_h2">地址区域：</td>
      <td><?php if ($this->_var['order_info']['idpic'] == 'rbtnyes'): ?>大陆地区<?php else: ?>非大陆地区<?php endif; ?></td>
      <td class="title_h2">身份证号码：</td>
      <td><?php echo $this->_var['order_info']['txtidcode']; ?></td>
    </tr> 
    <tr>
      <td class="title_h2">国家/地区：</td>
      <td><?php echo str_replace('//', ' ', $this->_var['order_info']['txtRece_countrys']); ?></td>
      <td class="title_h2">邮编：</td>
      <td><?php echo $this->_var['order_info']['txtRece_postoffice']; ?></td>
    </tr>
    <tr>
      <td class="title_h2">详细地址：</td>
      <td colspan="3"><?php echo $this->_var['order_info']['txtRece_address']; ?></td>
    </tr>          
  </table> 
  <?php if ($this->_var['order_info']['Memo']): ?>
  <table width="100%" cellspacing="1" class="kdorder_add">
    <tr>
      <td class="title_h1">&nbsp;六、运单备注</td></tr>
    <tr><td><?php echo $this->_var['order_info']['Memo']; ?></td></tr>
  </table> 
  <?php endif; ?>    
</div>
<?php endif; ?>
</div></div>
<div class="clear"></div>
</div>
</div>
<?php echo $this->fetch('footer_member.html'); ?>